Use collective LICENSE attribution and PEP 639 license metadata - #809
Conversation
| requires-python = ">=3.10" | ||
| readme = "README.md" | ||
| license = {file = "LICENSE"} | ||
| license = "MIT" |
There was a problem hiding this comment.
Self-review round one (implementation behavior): CLEAN
Base 82e88f4ebbd89a4dad8b3b57ac412012601f0c45, head 0fac3b9d6115df96608e5dafda11614883094eea.
Covered:
uv buildoutput: wheel and sdist METADATA (License-Expression: MIT,License-FileLICENSE/NOTICE, noLicense:field or classifier);- NOTICE still ships in the sdist despite
only-include; twine checkon both artifacts;uv lock --check;benchmarks/tests/test_packaging.pyviajust benchmark test;- the
docs/conf.pycopyright/authorusage (defined only there) and the rendered footer; - the README license badge: shields.io
pypi/lrenderslicense_expression, checked againsthatchlinganduv, which publish only an expression.
|
|
||
| [build-system] | ||
| requires = ["hatchling", "hatch-vcs"] | ||
| requires = ["hatchling>=1.27", "hatch-vcs"] |
There was a problem hiding this comment.
Self-review round two (claims and operational behavior): FINDINGS, repaired in the PR description
Claims checked:
hatchling>=1.27: the hatchling changelog shows 1.26.0 adopted the array form oflicense-files, and 1.27.0 made core metadata 2.4 the default.- The
twine checkclaim matches whatgh-action-pypi-publishruns. - The Sphinx footer text matches the rendered HTML.
Findings and repairs:
- The PR body's before/after table (following Revisit LICENSE attribution and package license metadata #807's premise) said the old wheel had only
License-File: NOTICE. The prior METADATA (built at the Add MIT headers to existing files written solely by the maintainer #805 head) already hadLicense-File: LICENSEandNOTICE. The table and WHY are corrected. - "PEP 639 replaces license classifiers" is reworded to "deprecates".
- A consumer-impact section was added for license scanners that read only
License:or classifiers, and for the build-time hatchling lower bound.
No code change; the head remains 0fac3b9.
| @@ -1,4 +1,4 @@ | |||
| Copyright 2017 laughingman7743 | |||
| Copyright 2017 The PyAthena authors | |||
There was a problem hiding this comment.
Independent review (relayed): CLEAN
- Reviewer: OpenAI Codex CLI 0.156.0 (
codex exec --sandbox read-only, reasoning effort high), session01a0d0de-9089-78c3-84e0-dc64e3d93f51. - Scope: static review of
82e88f4ebbd89a4dad8b3b57ac412012601f0c45..0fac3b9d6115df96608e5dafda11614883094eea, run in a detached snapshot at the head. The prompt excluded the PR number, description, and prior findings. The reviewer made no edits, builds, or test runs.
Reviewer result, summarized:
- Hatchling 1.27.0 produces core metadata 2.4 with
License-Expression: MITand both license files. LICENSEandNOTICEare included in the sdist despiteonly-include, and in the wheel's license directory, including when the wheel is rebuilt from the sdist.- Attribution and documentation text are consistent.
Non-blocking suggestion: benchmarks/tests/test_packaging.py:25 allows LICENSE/NOTICE but doesn't assert their presence or the metadata fields. Deferred: that test guards the exclusion of benchmark packaging from the main sdist. This PR's metadata was verified by building (see the round one record).
Change the root LICENSE copyright line to "The PyAthena authors", matching the file headers, and the Sphinx copyright and author values with it. Package author and contact metadata still names the maintainer. Declare the license as the SPDX expression "MIT" with LICENSE and NOTICE as license files, remove the MIT license classifier that PEP 639 replaces, and require hatchling 1.27 or later, whose default core metadata 2.4 writes License-Expression and License-File. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Set the package authors to "The PyAthena authors", matching LICENSE, and move the maintainer's name and email to maintainers, so that the metadata separates copyright attribution from the contact person. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0fac3b9 to
10bb29e
Compare
| authors = [ | ||
| {name = "The PyAthena authors"}, | ||
| ] | ||
| maintainers = [ |
There was a problem hiding this comment.
Maintainer-requested change: authors / maintainers, with independent follow-up (relayed)
At the maintainer's request, 10bb29e6e3d25c8c22038ba9b534da2277c05d99 sets authors to The PyAthena authors (no email) and moves the maintainer's name and email to maintainers. The branch was rebased onto master (#811, #813) first; git range-diff shows the earlier commit is patch-identical to 0fac3b9.
Self-review of the change:
uv build: METADATA and PKG-INFO haveAuthor: The PyAthena authorsandMaintainer-email: laughingman7743 <…>, with noAuthor-email.twine checkpassed for both artifacts.uv lock --check,just lint, andjust benchmark test(80 passed, 1 skipped) pass.- Consumer effect: tools that read the author email now find it in
Maintainer-email. The PR body's metadata table records this.
Independent follow-up — Codex CLI 0.156.0, read-only, effort high, session 01a0d42b-1907-7361-b4a9-97c0bf0669ca. Static review of HEAD~1..HEAD at 10bb29e. Result: CLEAN.
- These are valid PEP 621 fields, and they map to the intended core metadata.
- The benchmarks workspace member doesn't override the root metadata.
- No repository statement contradicts the attribution.
- The rebased earlier commit is patch-equivalent to
0fac3b9.
Non-blocking suggestion, deferred as before: assert the metadata fields in benchmarks/tests/test_packaging.py. That test guards benchmark packaging, and this PR's metadata was verified by building.
WHAT
PyAthena remains MIT-licensed. This PR changes how the license is attributed and declared.
LICENSE: the copyright line changes fromCopyright 2017 laughingman7743toCopyright 2017 The PyAthena authors, matching the file headers. The MIT license text is unchanged.pyproject.toml(PEP 639):license = "MIT"andlicense-files = ["LICENSE", "NOTICE"]replacelicense = {file = "LICENSE"}.License :: OSI Approved :: MIT Licenseclassifier is removed, because PEP 639 deprecates license classifiers in favor of the license expression.hatchling>=1.27. Hatchling 1.26.0 introduced the array form oflicense-files, and 1.27.0 made core metadata 2.4 (which writesLicense-ExpressionandLicense-File) the default.authorsbecomesThe PyAthena authors(no email), and the maintainer's name and email move tomaintainers. METADATA then hasAuthor: The PyAthena authorsandMaintainer-email: laughingman7743 <…>, so copyright attribution and the contact person are separate.docs/conf.py: the Sphinxcopyrightbecomes2017-<current year>, The PyAthena authors, andauthorbecomesThe PyAthena authors.docs/contributing.md: the sentence saying the policy doesn't change the rootLICENSEis reworded, since this PR changes it.Wheel METADATA, before and after:
License:License-Expression:MITLicense-File:LICENSE,NOTICELICENSE,NOTICE(now declared explicitly)Classifier: License :: OSI Approved :: MIT LicenseAuthor-email:laughingman7743 <…>Author:The PyAthena authorsMaintainer-email:laughingman7743 <…>Consumer impact:
License:field or license classifiers needLicense-Expressionsupport to show MIT. PyPI and the README's shields.io badge already readlicense_expression; I checked the badge withhatchlinganduv, which publish onlylicense_expression.WHY
Closes #807.
The wheel METADATA already listed both
LICENSEandNOTICEas license files (#807 mentioned onlyNOTICE). The license text came fromlicense = {file = "LICENSE"}.The maintainer holds the
LICENSEnotice and chose the collective attributionThe PyAthena authors, which new files have used since #788 and existing maintainer-only files since #805.TEST
Tested at the head commit of this PR, rebased onto master after #811 and #813:
uv build:Metadata-Version: 2.5withLicense-Expression: MIT,License-File: LICENSE, andLicense-File: NOTICE, with noLicense:field and no license classifier.Author: The PyAthena authorsandMaintainer-email: laughingman7743 <…>.PKG-INFOhas the same fields.dist-info/licenses/LICENSEandNOTICE. The sdist containsLICENSEandNOTICE.uvx twine checkon the sdist and wheel: both PASSED. This is the checkgh-action-pypi-publishruns.uv lock --check: passes, with no lock change.just lint: passes.just benchmark test: 80 passed, 1 skipped. This includesbenchmarks/tests/test_packaging.py, which the benchmark workflow runs only onbenchmarks/changes.uv run sphinx-build docs: the footer rendersCopyright © 2017-2026, The PyAthena authors. The build's warnings are pre-existing and unrelated.markdownlint-cli2 docs/contributing.md: 0 errors.Maintainer release task: after the next release, confirm the license shown on PyPI.
No AWS resources are needed.
🤖 Generated with Claude Code